package cn.cihon.ubi.qorosauto.bo;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * 
 * 车辆标准数据，用来存储每一时刻车机生产的车辆瞬时状态数据
 * 
 * 每个车厂都有自己的数据标准，为了能让各个车厂的数据能够适应 计算，故创建车辆标准数据类
 * 
 * 当行车数据输入车联网大数据平台时，系统会按照各个车厂的解析 规则先将数据解析成平台可以识别的数据，然后会结合标准数据定义
 * 对明文数据进行清洗、转换，最终得到车辆标准数据
 * 
 * @author guodawei
 *
 */
public class VehicleStandardData implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private Integer HeaderFlag = 0xAA55AA55; // 固定值0xAA55AA55
	private Integer Version = 0; // 版本号，固定值1.0
	private Integer RecordLen = 0; // 长度，固定值：1024
	private String VIN = null; // VIN码
	private Date RecordTimestamp = null; // 记录产生时间
	private String UserAccount = null; // 用户账号
	private String CarDataTimestamp = null; // 车辆数据采集时间
	private Double Longitude = 0.0; // 经度
	private Double Latitude = 0.0; // Latitude
	private Integer CanDataLen = 0; // Can数据长度
	private Integer DataPackageSize = 0; // 数据包大小
	private Double KilometreMileage = 0.0; // 公里里程
	private Double FLPressure = 0.0; // 前左轮胎压
	private Double FRPressure = 0.0; // 前右轮胎压
	private Double RLPressure = 0.0; // 后左轮胎压
	private Double RRPressure = 0.0; // 后右轮胎压
	private Integer StatDoorAjarFL = 0; // 左前门开关状态
	private Integer StatDoorAjarFR = 0; // 右前门开关状态
	private Integer StatDoorAjarRL = 0; // 左后门开关状态
	private Integer StatDoorAjarRR = 0; // 右后门开关状态
	private Integer StatTrunkAjar = 0; // 后备箱状态
	private Integer CarDataCount = 0;
	private Integer CarDataSize = 0;
	private Integer ItemFlags = 0;
	private String CarTime = null; // 车辆时间戳
	private Double InstantConsum = 0.0; // 瞬时油耗
	private Double LongAcceleration = 0.0; // 加速度（急加速阈值定义、Eco Driver定义、Safe
											// Driver定义，菲亚特500）
	private Double SteeringPos = 0.0; // 方向盘位置
	private Double SteeringAnglleSpeed = 0.0; // 方向盘转速
	private Double SteeringPosState = 0.0; // 方向盘有效位
	private Double STATSASCalibration = 0.0;
	private Double VehicleSpeed = 0.0; // 车辆速度
	private Double EngineSpeed = 0.0; // 引擎速度

	public VehicleStandardData() {
	}

	public VehicleStandardData(Integer HeaderFlag, Integer Version,
			Integer RecordLen, String VIN, Date RecordTimestamp,
			String UserAccount, String CarDataTimestamp, Double Longitude,
			Double Latitude, Integer CanDataLen, Integer DataPackageSize,
			Double KilometreMileage, Double FLPressure, Double FRPressure,
			Double RLPressure, Double RRPressure, Integer StatDoorAjarFL,
			Integer StatDoorAjarFR, Integer StatDoorAjarRL,
			Integer StatDoorAjarRR, Integer StatTrunkAjar,
			Integer CarDataCount, Integer CarDataSize, Integer ItemFlags,
			String CarTime, Double InstantConsum, Double LongAcceleration,
			Double SteeringPos, Double SteeringAnglleSpeed,
			Double SteeringPosState, Double STATSASCalibration,
			Double VehicleSpeed, Double EngineSpeed) {
		this.HeaderFlag = HeaderFlag;
		this.Version = Version;
		this.RecordLen = RecordLen;
		this.VIN = VIN;
		this.RecordTimestamp = RecordTimestamp;
		this.UserAccount = UserAccount;
		this.CarDataTimestamp = CarDataTimestamp;
		this.Longitude = Longitude;
		this.Latitude = Latitude;
		this.CanDataLen = CanDataLen;
		this.DataPackageSize = DataPackageSize;
		this.KilometreMileage = KilometreMileage;
		this.FLPressure = FLPressure;
		this.FRPressure = FRPressure;
		this.RLPressure = RLPressure;
		this.RRPressure = RRPressure;
		this.StatDoorAjarFL = StatDoorAjarFL;
		this.StatDoorAjarFR = StatDoorAjarFR;
		this.StatDoorAjarRL = StatDoorAjarRL;
		this.StatDoorAjarRR = StatDoorAjarRR;
		this.StatTrunkAjar = StatTrunkAjar;
		this.CarDataCount = CarDataCount;
		this.CarDataSize = CarDataSize;
		this.ItemFlags = ItemFlags;
		this.CarTime = CarTime;
		this.InstantConsum = InstantConsum;
		this.LongAcceleration = LongAcceleration;
		this.SteeringPos = SteeringPos;
		this.SteeringAnglleSpeed = SteeringAnglleSpeed;
		this.SteeringPosState = SteeringPosState;
		this.STATSASCalibration = STATSASCalibration;
		this.VehicleSpeed = VehicleSpeed;
		this.EngineSpeed = EngineSpeed;
	}

	public Integer getHeaderFlag() {
		return HeaderFlag;
	}

	public void setHeaderFlag(Integer headerFlag) {
		HeaderFlag = headerFlag;
	}

	public Integer getVersion() {
		return Version;
	}

	public void setVersion(Integer version) {
		Version = version;
	}

	public Integer getRecordLen() {
		return RecordLen;
	}

	public void setRecordLen(Integer recordLen) {
		RecordLen = recordLen;
	}

	public String getVIN() {
		return VIN;
	}

	public void setVIN(String vIN) {
		VIN = vIN;
	}

	public Date getRecordTimestamp() {
		return RecordTimestamp;
	}

	public void setRecordTimestamp(Date recordTimestamp) {
		RecordTimestamp = recordTimestamp;
	}

	public String getUserAccount() {
		return UserAccount;
	}

	public void setUserAccount(String userAccount) {
		UserAccount = userAccount;
	}

	public String getCarDataTimestamp() {
		return CarDataTimestamp;
	}

	public void setCarDataTimestamp(String carDataTimestamp) {
		CarDataTimestamp = carDataTimestamp;
	}

	public Double getLongitude() {
		return Longitude;
	}

	public void setLongitude(Double longitude) {
		Longitude = longitude;
	}

	public Double getLatitude() {
		return Latitude;
	}

	public void setLatitude(Double latitude) {
		Latitude = latitude;
	}

	public Integer getCanDataLen() {
		return CanDataLen;
	}

	public void setCanDataLen(Integer canDataLen) {
		CanDataLen = canDataLen;
	}

	public Integer getDataPackageSize() {
		return DataPackageSize;
	}

	public void setDataPackageSize(Integer dataPackageSize) {
		DataPackageSize = dataPackageSize;
	}

	public Double getKilometreMileage() {
		return KilometreMileage;
	}

	public void setKilometreMileage(Double kilometreMileage) {
		KilometreMileage = kilometreMileage;
	}

	public Double getFLPressure() {
		return FLPressure;
	}

	public void setFLPressure(Double fLPressure) {
		FLPressure = fLPressure;
	}

	public Double getFRPressure() {
		return FRPressure;
	}

	public void setFRPressure(Double fRPressure) {
		FRPressure = fRPressure;
	}

	public Double getRLPressure() {
		return RLPressure;
	}

	public void setRLPressure(Double rLPressure) {
		RLPressure = rLPressure;
	}

	public Double getRRPressure() {
		return RRPressure;
	}

	public void setRRPressure(Double rRPressure) {
		RRPressure = rRPressure;
	}

	public Integer getStatDoorAjarFL() {
		return StatDoorAjarFL;
	}

	public void setStatDoorAjarFL(Integer statDoorAjarFL) {
		StatDoorAjarFL = statDoorAjarFL;
	}

	public Integer getStatDoorAjarFR() {
		return StatDoorAjarFR;
	}

	public void setStatDoorAjarFR(Integer statDoorAjarFR) {
		StatDoorAjarFR = statDoorAjarFR;
	}

	public Integer getStatDoorAjarRL() {
		return StatDoorAjarRL;
	}

	public void setStatDoorAjarRL(Integer statDoorAjarRL) {
		StatDoorAjarRL = statDoorAjarRL;
	}

	public Integer getStatDoorAjarRR() {
		return StatDoorAjarRR;
	}

	public void setStatDoorAjarRR(Integer statDoorAjarRR) {
		StatDoorAjarRR = statDoorAjarRR;
	}

	public Integer getStatTrunkAjar() {
		return StatTrunkAjar;
	}

	public void setStatTrunkAjar(Integer statTrunkAjar) {
		StatTrunkAjar = statTrunkAjar;
	}

	public Integer getCarDataCount() {
		return CarDataCount;
	}

	public void setCarDataCount(Integer carDataCount) {
		CarDataCount = carDataCount;
	}

	public Integer getCarDataSize() {
		return CarDataSize;
	}

	public void setCarDataSize(Integer carDataSize) {
		CarDataSize = carDataSize;
	}

	public Integer getItemFlags() {
		return ItemFlags;
	}

	public void setItemFlags(Integer itemFlags) {
		ItemFlags = itemFlags;
	}

	public String getCarTime() {
		return CarTime;
	}

	public void setCarTime(String carTime) {
		CarTime = carTime;
	}

	public Double getInstantConsum() {
		return InstantConsum;
	}

	public void setInstantConsum(Double instantConsum) {
		InstantConsum = instantConsum;
	}

	public Double getLongAcceleration() {
		return LongAcceleration;
	}

	public void setLongAcceleration(Double longAcceleration) {
		LongAcceleration = longAcceleration;
	}

	public Double getSteeringPos() {
		return SteeringPos;
	}

	public void setSteeringPos(Double steeringPos) {
		SteeringPos = steeringPos;
	}

	public Double getSteeringAnglleSpeed() {
		return SteeringAnglleSpeed;
	}

	public void setSteeringAnglleSpeed(Double steeringAnglleSpeed) {
		SteeringAnglleSpeed = steeringAnglleSpeed;
	}

	public Double getSteeringPosState() {
		return SteeringPosState;
	}

	public void setSteeringPosState(Double steeringPosState) {
		SteeringPosState = steeringPosState;
	}

	public Double getSTATSASCalibration() {
		return STATSASCalibration;
	}

	public void setSTATSASCalibration(Double sTATSASCalibration) {
		STATSASCalibration = sTATSASCalibration;
	}

	public Double getVehicleSpeed() {
		return VehicleSpeed;
	}

	public void setVehicleSpeed(Double vehicleSpeed) {
		VehicleSpeed = vehicleSpeed;
	}

	public Double getEngineSpeed() {
		return EngineSpeed;
	}

	public void setEngineSpeed(Double engineSpeed) {
		EngineSpeed = engineSpeed;
	}
	
	public String toString() {
        return ToStringBuilder.reflectionToString(this,
            ToStringStyle.SIMPLE_STYLE);
    }

}
